<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    @include('public.h5_head')
    <title>个人中心</title>
    <script src="{{ env('CDN_DOMAIN_NAME') }}/js/commonjs/rem.js"></script>
    <link rel="stylesheet" type="text/css" href="{{ env('CDN_DOMAIN_NAME') }}/css/commoncss/common.css"/>
    <link rel="stylesheet" type="text/css" href="{{ env('CDN_DOMAIN_NAME') }}/css/merchant.css"/>
</head>
    <script src="{{ env('CDN_DOMAIN_NAME') }}/js/commonjs/iscroll.js"></script>
    <script src="{{ env('CDN_DOMAIN_NAME') }}/js/app.js"></script>
<style>
    .wechat_buyers{cursor: pointer;}
</style>
<body onload="loaded()">
<div id="merchant">
    <div class="wrap">
        <div class="merchant_main">
            <div class="merchant_t">
                <img class="bg_blur" src="/img/bg-p.jpg"/>
                <div class="coverage">
                    <div class="coverage1"></div>
                    <div class="coverage2"></div>
                    <div class="coverage3"></div>
                    <div class="merchant_img">
                        @if(Auth::user()->id == 0)
                            <img src="/img/head1x.png" alt="" />
                        @else
                            <img src="{{ Auth::user()->face }}" alt="" />
                        @endif
                    </div>
                </div>
            </div>
            <ul class="nav">
                {{--<li class="nav_footer" onclick="window.location.href='/Business/getNoPayOrderList'">--}}
                    {{--<p class="nav_p1">待催款 <span class="nav_sp1">(<span class="nav_sp2">{{$nopaynum}}</span>)</span></p>--}}
                    {{--<span class="footer_sp"><img src="/img/youjiantou.png" alt="" /></span>--}}
                {{--</li>--}}
                @if(Auth::user()->user_type)
                <li class="nav_footer" onclick="window.location.href='/Business/producList'">
                    <p class="nav_p1">发布列表</p>
                    <span class="footer_sp"><img src="/img/youjiantou.png" alt="" /></span>
                </li>
                    <li class="nav_footer" onclick="window.location.href='/Business/bus_products'">
                        <p class="nav_p1">往期商品</p>
                        <span class="footer_sp"><img src="/img/youjiantou.png" alt="" /></span>
                    </li>
                @endif
                {{--<li class="nav_footer" onclick="window.location.href='/Business/operateTool'">--}}
                    {{--<p class="nav_p1">控区管理</p>--}}
                    {{--<span class="footer_sp"><img src="/img/youjiantou.png" alt="" /></span>--}}
                {{--</li>--}}
                <li class="nav_footer" onclick="window.location.href='/Business/getAllOrders'">
                    <p class="nav_p1">订单列表</p>
                    <span class="footer_sp"><img src="/img/youjiantou.png" alt="" /></span>
                </li>
                @if(Auth::user()->to_examine)
                <li class="nav_footer" onclick="window.location.href='/toExamineList'">
                    <p class="nav_p1">客户审核</p>
                    <span class="footer_sp"><img src="/img/youjiantou.png" alt="" /></span>
                </li>
                @endif
                {{--<li class="nav_footer" onclick="window.location.href='/Business/userOnCreditList'">--}}
                    {{--<p class="nav_p1">赊账列表</p>--}}
                    {{--<span class="footer_sp"><img src="/img/youjiantou.png" alt="" /></span>--}}
                {{--</li>--}}
                {{--<li class="nav_footer" onclick="window.location.href='/Business/getNoTakeOrders'">--}}
                    {{--<p class="nav_p1">未收货列表</p>--}}
                    {{--<span class="footer_sp"><img src="/img/youjiantou.png" alt="" /></span>--}}
                {{--</li>--}}

                <li class="nav_footer" onclick="window.location.href='/map/mapIndex'">
                    <p class="nav_p1">区域地图</p>
                    <span class="footer_sp"><img src="/img/youjiantou.png" alt="" /></span>
                </li>
                <li class="nav_footer" onclick="window.location.href='/admin/pro-storage'">
                    <p class="nav_p1">分公司收货</p>
                    <span class="footer_sp"><img src="/img/youjiantou.png" alt="" /></span>
                </li>

                {{--<li class="nav_footer" onclick="window.location.href='/Business/express'">--}}
                    {{--<p class="nav_p1">运费列表</p>--}}
                    {{--<span class="footer_sp"><img src="/img/youjiantou.png" alt="" /></span>--}}
                {{--</li>--}}
                {{--<li class="nav_footer" onclick="window.location.href='/Business/getOrderView'">--}}
                    {{--<p class="nav_p1">账单查询</p>--}}
                    {{--<span class="footer_sp"><img src="/img/youjiantou.png" alt="" /></span>--}}
                {{--</li>--}}
                <li class="nav_footer nav_last">
                    <p class="nav_p1">微信绑定</p>
                    @if(Auth::user()->openid)
                        <p class="nav_p2">已绑定</p>
                    @else
                        <p class="nav_p2 wechat_buyers" onclick="boundWechat()">未绑定</p>
                    @endif
                </li>
                <li class="nav_footer" style="background:#f1f1f1;"></li>
            </ul>
        </div>
    </div>
</div>
</body>
<script>
    /*滚动*/
    var myScroll;
    function loaded () {
        setTimeout(function(){
            myScroll = new IScroll('.wrap', {
                mouseWheel: true,
                click: true
            });
        },100);
    }
    document.addEventListener('touchmove', function (e) {e.preventDefault();},false);
    var openid = '{{ env('WECHAT_APPID') }}';
    var domain_name = '{{ env('DOMAIN_NAME') }}';
    function boundWechat() {
        window.location.href = "https://open.weixin.qq.com/connect/oauth2/authorize?appid="+openid+"&redirect_uri=https%3A%2F%2F"+domain_name+"%2Fuser%2FboundWechat&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect";
    }
    if($(".nav_sp2").text()==0){
        $(".nav_sp1").hide();
    }else{
        $(".nav_sp1").show();
    }
</script>
</html>
